#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "tree.h"
#include "common.h"

static void show(Item item);

int main()
{
	Item item;
	Tree atree;

	srand(time(0));
	createTree(&atree);
	
	item.data = rand() % 1000;
	while(!treeIsFull(&atree)){
		treeAddItem(&item,&atree);
		item.data = rand() % 1000;
	}
	
	traverse_tree(&atree,show);

	deleteAll(&atree);

	return 0;
}

static void  show(Item item)
{
	printf("%d ",item.data);
}

